package com.itheima.sh.exception;

import com.itheima.sh.response.StatusCode;

/**
 * @Description:  可预知异常类（自定义异常类）  程序员主动抛出
 * @Version: V1.0
 */
public class BusinessException extends RuntimeException {

    private StatusCode statusCode; // 状态码和提示信息1

    public BusinessException(StatusCode statusCode) {
        this.statusCode = statusCode;
    }

    // get方法
    public StatusCode getStatusCode() {
        return statusCode;
    }
}
